package com.zhuoyue.system.mapper;

import java.util.List;

import com.zhuoyue.common.annotation.DataSource;
import com.zhuoyue.common.core.domain.ChartData;
import com.zhuoyue.system.domain.TblGatewayZy;
import com.zhuoyue.system.domain.po.SelectTimePo;
import org.apache.ibatis.annotations.Param;

import static com.zhuoyue.common.enums.DataSourceType.SLAVE;

/**
 * gatewayZYMapper接口
 *
 * @author hewenze
 * @date 2020-09-08
 */
@DataSource(SLAVE)
public interface TblGatewayZyMapper {
    /**
     * 查询gatewayZY
     *
     * @param id gatewayZYID
     * @return gatewayZY
     */
    public TblGatewayZy selectTblGatewayZyById(Long id);

    /**
     * 查询gatewayZY列表
     *
     * @param tblGatewayZy gatewayZY
     * @return gatewayZY集合
     */
    public List<TblGatewayZy> selectTblGatewayZyList(TblGatewayZy tblGatewayZy);

    /**
     * 新增gatewayZY
     *
     * @param tblGatewayZy gatewayZY
     * @return 结果
     */
    public int insertTblGatewayZy(TblGatewayZy tblGatewayZy);

    /**
     * 修改gatewayZY
     *
     * @param tblGatewayZy gatewayZY
     * @return 结果
     */
    public int updateTblGatewayZy(TblGatewayZy tblGatewayZy);

    /**
     * 删除gatewayZY
     *
     * @param id gatewayZYID
     * @return 结果
     */
    public int deleteTblGatewayZyById(Long id);

    /**
     * 批量删除gatewayZY
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteTblGatewayZyByIds(Long[] ids);

    /**
     * 根据手机号和组织编码查询网关ID
     *
     * @param account
     * @param orgCode
     * @return
     */
    List<String> getGatewayIdByAccountAndOrgCode(@Param("account") String account, @Param("orgCode") String orgCode);

    List<ChartData> getGatewayGeoChartData(SelectTimePo selectTimePo);
}
